const express = require('express');
const sharesService = require('../services/share');

const router = express.Router();

// 获取分享的文件
router.get('/', sharesService.getShared);
// 获取分享的文件详情
router.get('/getSharedDetails', sharesService.getSharedDetails);
// 创建分享
router.post('/', sharesService.createShare);
// 删除分享记录
router.delete('/:id', sharesService.deleteShare);


// 获取分享的记录
router.get('/records/:id', sharesService.getShareRecords);
// 删除分享的记录
router.delete('/records/:id', sharesService.deleteShareRecord);

module.exports = router;